import os
import pygame

class Mapa:
        
        def __init__(self,tipo_fase = None):

                self.fase = "fase%d"%tipo_fase
                self.estrutura1 = [[0,"p1","lp1",0,0,0,0,0,0,'time',0,0,0,0,0,'p2','lp2',0,0],
                                                                                [0,"sp1",0,0,0,0,0,0,0,0,0,0,0,0,0,0,"sp2",0,0],
										[0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],
										[0,1,0,0,'rm','rm',0,0,'rm','rm','rm',0,0,'rm','rm','rm',0,1,0],
										[0,1,0,1,0,1,'rm',1,0,1,0,1,'rm',1,0,1,0,1,'rm'],
										[0,1,'rm','rm','rm',0,0,'rm',0,0,'rm',0,0,0,'rm',0,'rm',1,0],
										[0,1,'rm',1,'rm',1,0,1,0,1,0,1,0,1,0,1,0,1,0],
										[0,1,'rm','rm','rm','rm','rm',0,'rm',0,0,'rm','rm',0,0,'rm','rm',1,0],
										[0,1,0,1,'rm',1,0,1,0,1,0,1,0,1,0,1,0,1,0],
										[0,1,'rm',0,'rm','rm','rm','rm',0,'rm','rm',0,'rm','rm','rm',0,'rm',1,0],
										[0,1,0,1,'rm',1,'rm',1,'rm',1,0,1,0,1,'rm',1,'rm',1,0],
										[0,1,'rm',0,0,'rm','rm',0,'rm','rm',0,'rm',0,0,'rm','rm','rm',1,0],
										[0,1,'rm',1,0,1,0,1,0,1,'rm',1,0,1,'rm',1,0,1,0],
										[0,1,'rm',0,'rm',0,'rm','rm','rm',0,0,0,'rm',0,'rm',0,0,1,0],
										[0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],
										[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]
                
                
                
                
                
                self.__muro = pygame.image.load("img"+ os.sep +"cenario"+ os.sep +"muro.png").convert_alpha()
                self.__barreira = pygame.image.load("img"+ os.sep +"cenario"+ os.sep+self.fase+os.sep +"destrutivel.png").convert_alpha()
                self.__lista_paredes = []
                self.fundo = pygame.image.load("img" + os.sep + "cenario" + os.sep +os.sep+self.fase+os.sep+ "mapa.png").convert()
        
        def getFase(self):
                return self.fase
        
        def getImagem(self):
                return self.__muro
        def getImagemDestrutivel(self):
				return self.__barreira
        def getMatriz(self):
                return self.estrutura1
        def setMatriz(self,i,j,elemento):
                self.estrutura1[i][j] = elemento
                return True
        
        def getPlanoDeFundo(self):
				return self.backgound_fases[0]
	def teste(self):
		return True
